/**
 * 
 */
package com.estock.web.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.estock.common.model.task.Task;
import com.estock.common.service.impl.BaseServiceImpl;
import com.estock.web.dao.TaskDao;
import com.estock.web.service.TaskService;

/**
 * @author richard
 *
 */
@Service
public class TaskServiceImpl extends BaseServiceImpl implements TaskService {
	
	@Resource
	TaskDao taskDao;
	public TaskDao getTaskDao() {
		return taskDao;
	}

	@Override
	public List<Task> findAllTasks() {
		return getTaskDao().findAll(Task.class);
	}
	
	@Override
	public Task saveOrUpdateTask(Task task) {
		getTaskDao().saveOrUpdate(task);
		return task;
	}

	@Override
	public void deleteTask(Task task) {
		getTaskDao().delete(task);
	}
	
}
